name: pre-commit run_id: commands[2] env HOME: /home/jenkins env LANG: C.UTF-8 env PATH: /w/workspace/transportpce-tox-verify-scandium/.tox/pre-commit/bin:/opt/pyenv/bin:/tmp/venv-T0Wn/bin:/opt/pyenv/shims:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin env PYTHONHASHSEED: 3047467000 env PIP_DISABLE_PIP_VERSION_CHECK: 1 env PYTHONIOENCODING: utf-8 env OLM_TIMER1: 3000 env OLM_TIMER2: 2000 env TOX_ENV_NAME: pre-commit env TOX_WORK_DIR: /w/workspace/transportpce-tox-verify-scandium/.tox env TOX_ENV_DIR: /w/workspace/transportpce-tox-verify-scandium/.tox/pre-commit env VIRTUAL_ENV: /w/workspace/transportpce-tox-verify-scandium/.tox/pre-commit metadata pid: 29163 cwd: /w/workspace/transportpce-tox-verify-scandium/tests allow: /w/workspace/transportpce-tox-verify-scandium/.tox/pre-commit/bin/*:sh:cpan:sudo:which:fixCIcentOS8reposMirrors.sh cmd: pre-commit run --all-files --show-diff-on-failure exit_code: 1 [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint:./gitlint-core[trusted-deps]. [INFO] Initializing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Initializing environment for https://github.com/pre-commit/mirrors-autopep8. [INFO] Initializing environment for https://github.com/perltidy/perltidy. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/pre-commit/mirrors-autopep8. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/perltidy/perltidy. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... trim trailing whitespace.................................................Passed Tabs remover.............................................................Passed autopep8.................................................................Failed - hook id: autopep8 - files were modified by this hook perltidy.................................................................Passed pre-commit hook(s) made changes. If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`. To run `pre-commit` as part of git workflow, use `pre-commit install`. All changes made by hooks: diff --git a/tests/transportpce_tests/common/test_utils.py b/tests/transportpce_tests/common/test_utils.py index 6e5b6e02..f2cc9efd 100644 --- a/tests/transportpce_tests/common/test_utils.py +++ b/tests/transportpce_tests/common/test_utils.py @@ -330,18 +330,18 @@ def mount_device(node: str, sim: str): body = {'node': [{ "node-id": node, "netconf-node-topology:netconf-node": { - "netconf-node-topology:host": "127.0.0.1", - "netconf-node-topology:port": SIMS[sim]['port'], - "netconf-node-topology:login-password-unencrypted": { - "netconf-node-topology:username": NODES_LOGIN, - "netconf-node-topology:password": NODES_PWD - }, - "netconf-node-topology:tcp-only": "false", - "netconf-node-topology:reconnect-on-changed-schema": "false", - "netconf-node-topology:connection-timeout-millis": "20000", - "netconf-node-topology:default-request-timeout-millis": "60000", - "netconf-node-topology:max-connection-attempts": "0", - "netconf-node-topology:keepalive-delay": "120"}}]} + "netconf-node-topology:host": "127.0.0.1", + "netconf-node-topology:port": SIMS[sim]['port'], + "netconf-node-topology:login-password-unencrypted": { + "netconf-node-topology:username": NODES_LOGIN, + "netconf-node-topology:password": NODES_PWD + }, + "netconf-node-topology:tcp-only": "false", + "netconf-node-topology:reconnect-on-changed-schema": "false", + "netconf-node-topology:connection-timeout-millis": "20000", + "netconf-node-topology:default-request-timeout-millis": "60000", + "netconf-node-topology:max-connection-attempts": "0", + "netconf-node-topology:keepalive-delay": "120"}}]} response = put_request(url[RESTCONF_VERSION].format('{}', node), body) if wait_until_log_contains(TPCE_LOG, 'Triggering notification stream NETCONF for node ' + node, 180): print('Node ' + node + ' correctly added to tpce topology', end='... ', flush=True) @@ -372,7 +372,8 @@ def check_device_connection(node: str): return_key = {'rfc8040': 'network-topology:node', 'draft-bierman02': 'node'} if return_key[RESTCONF_VERSION] in res.keys(): - connection_status = res[return_key[RESTCONF_VERSION]][0]['netconf-node-topology:netconf-node']['connection-status'] + connection_status = res[return_key[RESTCONF_VERSION] + ][0]['netconf-node-topology:netconf-node']['connection-status'] else: connection_status = res['errors']['error'][0] return {'status_code': response.status_code,